﻿using Shop.Core.Share;
using Shop.Model.Dto.Admin.Order;
using Shop.Model.View.Admin.Order;

namespace Shop.IServices.Admin;

public interface IOrdService: IAppService
{
    /// <summary>
    /// 订单列表
    /// </summary>
    /// <returns></returns>
    AppResult<PageModel<AOrderListVo>> OrderList(OrderListDto dto);

    /// <summary>
    /// 订单详情
    /// </summary>
    /// <param name="oId"></param>
    /// <returns></returns>
    AppResult<OrderDetailsVo> OrderDetails(long oId);

    /// <summary>
    /// 导出订单
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    byte[] ExportToExcel(ExportToExcelDto dto);

    /// <summary>
    /// 订单导出列
    /// </summary>
    /// <returns></returns>
    List<OrderFieldListVo> OrderFieldList();

    /// <summary>
    /// 计算行家业绩
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    byte[] ExportPerformance(ExportPerformanceDto dto);

    /// <summary>
    /// 订单商品
    /// </summary>
    /// <param name="oId"></param>
    /// <returns></returns>
    AppResult<List<OrdGoodsVo>> OrdGoods(long oId);

    /// <summary>
    /// 标记发货
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    Task<AppResult> Shipments(List<ShipmentsDto> dto);

    /// <summary>
    /// 取消订单
    /// </summary>
    /// <param name="oId"></param>
    /// <param name="userContextId"></param>
    /// <returns></returns>
    AppResult CancelOrd(long oId, long userContextId);

    /// <summary>
    /// 地址库
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    AppResult<List<AddAreaVo>> AddArea(string dto);

    /// <summary>
    /// 商品列表
    /// </summary>
    /// <param name="gName"></param>
    /// <returns></returns>
    AppResult<List<GoodsListVo>> GoodsList(string? gName);

    /// <summary>
    /// 创建订单
    /// </summary>
    /// <param name="dto"></param>
    /// <param name="userContextId"></param>
    /// <returns></returns>
    Task<AppResult> AddOrder(AddOrderDto dto, long userContextId);
}